import cv2
import numpy as np
import time
import mycanny
import gauss
import gray
import argparse

if __name__ == '__main__':
    parser = argparse.ArgumentParser()

    Thres1 = 60
    Thres2 = 180
    SobelDirect = 4 # 这个参数来决定sobel求梯度的方向，direct = {2, 4}，默认为2
    gausssigma = 3

    img = cv2.imread('pic/Lena.jpg')

    result_img = mycanny.Canny(img, gausssigma=1)
    # result_img = cv2.Canny(img, threshold1=60, threshold2=120)

    cv2.imshow('result', result_img)
    # cv2.imwrite('pic/result/cat_cv.png', result_img)
    cv2.waitKey()

